<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/webpage/common/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
  <title><spring:message code="sys.organization.title" /></title>
   <meta name="decorator" content="list"/>
  <script type="text/javascript" src="${staticPath }/uadmin/js/public-add.js"></script>
    <script type="text/javascript">

  </script>
 
</head>
<body title="<spring:message code="sys.organization.title" />">
<div class="easyui-panel" title="组织机构">
	<div class="content-padding">
	<grid:grid id="organizationGridId" async="false" treeGrid="true" expandColumn="name" sortable="false"  multiselect="false" onSelectRow="selectRow"
	           gridSetting="{beforeRequest:onloadFun,gridComplete:onloadFun}"  url="${adminPath}/sys/organization/ajaxOrgTreeList">
		<grid:column label="sys.common.key" hidden="true"   name="id" width="100"/>
		<grid:column label="sys.organization.code"  name="code"  width="30"/>
		<grid:column label="sys.organization.name"  name="name"  width="120"/>
		<grid:column label="sys.organization.type"  name="type"  dict="orggroup"   width="30"/>
		<grid:column label="sys.organization.orgType"  name="orgTypeName"    width="80"/>
		<grid:column label="sys.organization.remarks"  name="remarks"  width="60"/>
	    <%-- <grid:column label="sys.common.opt"  name="opt" formatter="button" width="100"/>
		<grid:button   groupname="opt" function="delete" url="${adminPath}/sys/organization/{id}/deleteOrg"/> --%>
	    
	    <grid:toolbar  function="create_" title="sys.toolbar.create" btnclass="btn-fa-plus"  icon="fa-plus" url="${adminPath}/sys/organization/createOrg"/>
		<grid:toolbar  function="update" title="sys.toolbar.update" btnclass="btn-fa-file-text-o"  icon="fa fa-file-text-o" url="${adminPath}/sys/organization/{id}/updateOrg"/>
		<grid:toolbar  function="delete" title="sys.toolbar.delete" btnclass="btn-fa-trash-o"  icon="fa fa-trash-o" url="${adminPath}/sys/organization/batch/deleteOrg"/>
		<%-- <grid:toolbar  function="search" />
		<grid:toolbar  function="reset"/> --%>
	</grid:grid>
	</div>
</div>
<script type="text/javascript">
var selectId = null;//选中的组织

/**
 * @description 选中行数据事件.<br>
 * @date 2018/8/17.<br>
 * @author 郑成功.<br>
 */
function selectRow(id){
	selectId = id; 
}

/**
 * @description 新增组织.<br>
 * @date 2018/8/17.<br>
 * @author 郑成功.<br>
 */
function create_(title,url,gridId,width,height){
	url = url + '?parentId='+selectId;
	create(title,url,gridId,width,height);
}
</script>
</body>
</html>